﻿using RecruitmentPage.Models.RPModel;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Web;

namespace RecruitmentPage.Models
{
    public class RPDatabaseInitializer : DropCreateDatabaseIfModelChanges<RPContext>
    {
        protected override void Seed(RPContext context)
        {
            
            Location l1 = new Location() { Name = "Việt Nam"};
            Location l2 = new Location() { Name = "Japan"};
            Location l3 = new Location() { Name = "England"};
            Location l4 = new Location() { Name = "America"};
            Location l6 = new Location() { Name = "Miền Nam", Parent = l1 };
            Location l7 = new Location() { Name = "Miền Bắc", Parent = l1 };
            Location l8 = new Location() { Name = "Miền Trung", Parent = l1 };
            Location l9 = new Location() { Name = "Tokyo", Parent = l2 };
            Location l10 = new Location() { Name = "Kyoto", Parent = l2 };
            Location l11 = new Location() { Name = "Fuji", Parent = l2 };
            Location l12 = new Location() { Name = "Forest", Parent = l3 };
            Location l13 = new Location() { Name = "Beach", Parent = l3 };
            Location l14 = new Location() { Name = "Moutain", Parent = l3 };
            Location l15 = new Location() { Name = "Texas", Parent = l4 };
            Location l16 = new Location() { Name = "San Diago", Parent = l4 };
            Location l17 = new Location() { Name = "Virgina", Parent = l4 };
            Location l18 = new Location() { Name= "TP HCM", Parent = l6};
            Location l19 = new Location() { Name = "Cần thơ" , Parent = l6 };
            Location l20 = new Location() { Name = "Hà Nội", Parent = l7 };
            Location l21 = new Location() { Name = "Hải Phòng", Parent = l7 };
            Location l22 = new Location() { Name = "TP HCM", Parent = l9 };
            Location l23 = new Location() { Name = "Cần thơ", Parent = l9 };
            Location l24 = new Location() { Name = "Hà Nội", Parent = l10 };
            Location l25 = new Location() { Name = "Hải Phòng", Parent = l10 };

            PersonalInfor pi1 = new PersonalInfor() { Name = "Trần Văn Hảo", Email = "microsoft@gmail.com", Birthday = DateTime.Now, PlaceofBirth = "Cà Mau", Gender = 1, Nationality = "Việt Nam", Address = "220 XVNT Q.Bình Thạnh, Tp.HCM", CellPhone = "0949949696", Description = "Our client is a multinational company with global operation, specialized in manufacturing energy saving products and semiconductor components.", CVName = "None" };
            PersonalInfor pi2 = new PersonalInfor() { Name = "Like a boss", Email = "amazon@yahoo.com", Birthday = DateTime.Now, PlaceofBirth = "Cà Mau", Gender = 2, Nationality = "Việt Kiều", Address = "220 XVNT Q.Bình Thạnh, Tp.HCM", CellPhone = "0949949696", Description = "Our company is the best",CVName="None" };
            PersonalInfor pi3 = new PersonalInfor() { Name = "Osin", Email = "facebook@hotmail.com", Birthday = DateTime.Now, PlaceofBirth = "Cà Mau", Gender = 0, Nationality = "Việt Kẹp", Address = "220 XVNT Q.Bình Thạnh, Tp.HCM", CellPhone = "0949949696", Description = "K2 Partnering Solutions is a global provider of enterprise software consultants, on contract and permanent basis. We work with the 'Rock Stars' of the industry, consultants with a proven ability to deliver exceptional results on the world’s most challenging and innovative enterprise projects. Today we are an organization of 300 Associates across 15 offices, in 4 continents. REQ™ are our quality control methodologies that delivers the best consultants to the best projects. Relationships: Connections built on trust, mutual benefit and respect. Expertise: Enterprise | Mobile | Cloud | that’s IT. Quality: The top 20% of the consultants in the market", CVName = "None" };
            PersonalInfor pi4 = new PersonalInfor() { Name = "Vũ Như Cẩn", Email = "facebook@hotmail.com", Birthday = DateTime.Now, PlaceofBirth = "Cà Mau", Gender = 0, Nationality = "Việt Kẹp", Address = "220 XVNT Q.Bình Thạnh, Tp.HCM", CellPhone = "0949949696", Description = "We have experience in Testing, Developing and Paying", CVName = "None" };
            PersonalInfor pi5 = new PersonalInfor() { Name = "Nguyễn Y Vân", Email = "facebook@hotmail.com", Birthday = DateTime.Now, PlaceofBirth = "Cà Mau", Gender = 0, Nationality = "Việt Kẹp", Address = "220 XVNT Q.Bình Thạnh, Tp.HCM", CellPhone = "0949949696", Description = "I have experience in Tesing", CVName = "None" };
            PersonalInfor pi6 = new PersonalInfor() { Name = "Lê Bùi Lan", Email = "facebook@hotmail.com", Birthday = DateTime.Now, PlaceofBirth = "Cà Mau", Gender = 0, Nationality = "Việt Kẹp", Address = "220 XVNT Q.Bình Thạnh, Tp.HCM", CellPhone = "0949949696", Description = "We have experience in Testing, Developing and Paying", CVName = "None" };
            PersonalInfor pi7 = new PersonalInfor() { Name = "Đỗ Văn Mai", Email = "facebook@hotmail.com", Birthday = DateTime.Now, PlaceofBirth = "Cà Mau", Gender = 0, Nationality = "Việt Kẹp", Address = "220 XVNT Q.Bình Thạnh, Tp.HCM", CellPhone = "0949949696", Description = "5 years experiences in Programming, Tesing and developer Architecture", CVName = "None" };
            PersonalInfor pi8 = new PersonalInfor() { Name = "Lê Văn Còn", Email = "facebook@hotmail.com", Birthday = DateTime.Now, PlaceofBirth = "Cà Mau", Gender = 0, Nationality = "Việt Kẹp", Address = "220 XVNT Q.Bình Thạnh, Tp.HCM", CellPhone = "0949949696", Description = "We have experience in Testing, Developing and Paying", CVName = "None" };
            PersonalInfor pi9 = new PersonalInfor() { Name = "Đậu Văn Xanh", Email = "facebook@hotmail.com", Birthday = DateTime.Now, PlaceofBirth = "Cà Mau", Gender = 0, Nationality = "Việt Kẹp", Address = "220 XVNT Q.Bình Thạnh, Tp.HCM", CellPhone = "0949949696", Description = "Most Valuable Developer Certificate from Microsoft", CVName = "None" };
            PersonalInfor pi10 = new PersonalInfor() { Name = "Rau Văn Má", Email = "facebook@hotmail.com", Birthday = DateTime.Now, PlaceofBirth = "Cà Mau", Gender = 0, Nationality = "Việt Kẹp", Address = "220 XVNT Q.Bình Thạnh, Tp.HCM", CellPhone = "0949949696", Description = "Have experience in applying job, can be a secrectary.", CVName = "None" };
            PersonalInfor pi11 = new PersonalInfor() { Name = "Lê Thị Lựu", Email = "facebook@hotmail.com", Birthday = DateTime.Now, PlaceofBirth = "Cà Mau", Gender = 0, Nationality = "Việt Kẹp", Address = "220 XVNT Q.Bình Thạnh, Tp.HCM", CellPhone = "0949949696", Description = "We have experience in Testing, Developing and Paying", CVName = "None" };
            PersonalInfor pi12 = new PersonalInfor() { Name = "Jamin", Email = "facebook@hotmail.com", Birthday = DateTime.Now, PlaceofBirth = "Cà Mau", Gender = 0, Nationality = "Việt Kẹp", Address = "220 XVNT Q.Bình Thạnh, Tp.HCM", CellPhone = "0949949696", Description = "We have experience in Testing, Developing and Paying", CVName = "None" };
            PersonalInfor pi13 = new PersonalInfor() { Name = "Kara tio", Email = "facebook@hotmail.com", Birthday = DateTime.Now, PlaceofBirth = "Cà Mau", Gender = 0, Nationality = "Việt Kẹp", Address = "220 XVNT Q.Bình Thạnh, Tp.HCM", CellPhone = "0949949696", Description = "We have experience in Testing, Developing and Paying", CVName = "None" };
            PersonalInfor pi14 = new PersonalInfor() { Name = "Lemon", Email = "facebook@hotmail.com", Birthday = DateTime.Now, PlaceofBirth = "Cà Mau", Gender = 0, Nationality = "Việt Kẹp", Address = "220 XVNT Q.Bình Thạnh, Tp.HCM", CellPhone = "0949949696", Description = "We have experience in Testing, Developing and Paying", CVName = "None" };

            context.Set<PersonalInfor>().Add(pi4);
            context.Set<PersonalInfor>().Add(pi5);
            context.Set<PersonalInfor>().Add(pi6);
            context.Set<PersonalInfor>().Add(pi7);
            context.Set<PersonalInfor>().Add(pi8);
            context.Set<PersonalInfor>().Add(pi9);
            context.Set<PersonalInfor>().Add(pi10);
            context.Set<PersonalInfor>().Add(pi11);
            context.Set<PersonalInfor>().Add(pi12);
            context.Set<PersonalInfor>().Add(pi13);
            context.Set<PersonalInfor>().Add(pi14);

            Currency c1 = new Currency() { Name = "VND", Currencysigns = "₫" };
            Currency c2 = new Currency() { Name = "USD", Currencysigns = "$" };
            Currency c3 = new Currency() { Name = "EUR", Currencysigns = "€" };
            Currency c4 = new Currency() { Name = "YEN", Currencysigns = "¥" };
            Currency c5 = new Currency() { Name = "GBP", Currencysigns = "£" };
            Currency c6 = new Currency() { Name = "RUB", Currencysigns = "руб" };

            context.Set<Currency>().Add(c1);
            context.Set<Currency>().Add(c2);
            context.Set<Currency>().Add(c3);
            context.Set<Currency>().Add(c4);
            context.Set<Currency>().Add(c5);
            context.Set<Currency>().Add(c6);

            context.Set<Location>().Add(l6);
            context.Set<Location>().Add(l7);
            context.Set<Location>().Add(l8);
            context.Set<Location>().Add(l9);
            context.Set<Location>().Add(l10);
            context.Set<Location>().Add(l11);
            context.Set<Location>().Add(l12);
            context.Set<Location>().Add(l13);
            context.Set<Location>().Add(l14);
            context.Set<Location>().Add(l15);
            context.Set<Location>().Add(l16);
            context.Set<Location>().Add(l17);
            context.Set<Location>().Add(l18);
            context.Set<Location>().Add(l19);
            context.Set<Location>().Add(l20);
            context.Set<Location>().Add(l21);
            context.Set<Location>().Add(l22);
            context.Set<Location>().Add(l23);
            context.Set<Location>().Add(l24);
            context.Set<Location>().Add(l25);

            Industry i1 = new Industry() { Name = "Banking" };
            Industry i2 = new Industry() { Name = "Education" };
            Industry i3 = new Industry() { Name = "Consulting" };
            Industry i4 = new Industry() { Name = "General"};
            Industry i5 = new Industry() { Name = "Insurance"};

            Industry i6 = new Industry() { Name = "Oil & Gas",Parent = i1, Description = "Oil & Gas for..." };
            Industry i7 = new Industry() { Name = "SOT-Sales", Parent = i1, Description = "Sale off 50%" };
            Industry i8 = new Industry() { Name = "Risk", Parent = i2, Description = "Risk is not problem" };
            Industry i9 = new Industry() { Name = "REA-Leasing", Parent = i2, Description = "Office for lease" };
            Industry i10 = new Industry() { Name = "Research", Parent = i3, Description = "Technoque research" };
            Industry i11 = new Industry() { Name = "Hi-Tech", Parent = i4, Description = "Glass Hi-Tech" };
            Industry i12 = new Industry() { Name = "OFS-Front Line", Parent = i5, Description = "O.." };

            context.Set<Industry>().Add(i6);
            context.Set<Industry>().Add(i7);
            context.Set<Industry>().Add(i8);
            context.Set<Industry>().Add(i9);
            context.Set<Industry>().Add(i10);
            context.Set<Industry>().Add(i11);
            context.Set<Industry>().Add(i12);

            JobLevel jl1 = new JobLevel() {Name = "QA" };
            JobLevel jl2 = new JobLevel() { Name = "Manager" };
            JobLevel jl3 = new JobLevel() { Name = "Staff" };
            context.Set<JobLevel>().Add(jl1);
            context.Set<JobLevel>().Add(jl2);
            context.Set<JobLevel>().Add(jl3);

            JobType jt1 = new JobType() {Name = "Contractor" };
            JobType jt2 = new JobType() { Name = "Full-time Permanent" };
            JobType jt3 = new JobType() { Name = "Full-time temporary" };
            JobType jt4 = new JobType() { Name = "Internship" };
            JobType jt5 = new JobType() { Name = "Other" };

            context.Set<JobType>().Add(jt1);
            context.Set<JobType>().Add(jt2);
            context.Set<JobType>().Add(jt3);
            context.Set<JobType>().Add(jt4);
            context.Set<JobType>().Add(jt5);

            University u1 = new University() {Name="Hoa Sen University" };
            University u2 = new University() { Name = "Van Lang University" };
            University u3 = new University() { Name = "Ky thuat Su Pham University" };
            University u4 = new University() { Name = "Sai Gon University" };
            University u5 = new University() { Name = "Go Vap University" };

            context.Set<University>().Add(u1);
            context.Set<University>().Add(u2);
            context.Set<University>().Add(u3);
            context.Set<University>().Add(u4);
            context.Set<University>().Add(u5);

            KindofDegree kd1 = new KindofDegree() {Name="College" };
            KindofDegree kd2 = new KindofDegree() { Name = "Intermediate" };
            KindofDegree kd3 = new KindofDegree() { Name = "University" };
            context.Set<KindofDegree>().Add(kd1);
            context.Set<KindofDegree>().Add(kd2);
            context.Set<KindofDegree>().Add(kd3);

            Degree d1 = new Degree() { Name = "Diploma"};
            Degree d2 = new Degree() { Name = "Bachelor" };
            Degree d3 = new Degree() { Name = "Master" };
            Degree d4 = new Degree() { Name = "Ph.D" };
            Degree d5 = new Degree() { Name = "Pharmacist" };
            Degree d6 = new Degree() { Name = "Medical Doctor" };

            context.Set<Degree>().Add(d1);
            context.Set<Degree>().Add(d2);
            context.Set<Degree>().Add(d3);
            context.Set<Degree>().Add(d4);
            context.Set<Degree>().Add(d5);
            context.Set<Degree>().Add(d6);

            Major m1 = new Major() {Name = "Accounting Faculty" };
            Major m2 = new Major() { Name = "Advocacy" };
            Major m3 = new Major() { Name = "Architect" };
            Major m4 = new Major() { Name = "Biology" };
            Major m5 = new Major() { Name = "Business Law" };
            Major m6 = new Major() { Name = "Chemistry" };
            Major m7 = new Major() { Name = "Civil Law" };
            Major m8 = new Major() { Name = "Commerce" };
            Major m9 = new Major() { Name = "Geology" };
            Major m10 = new Major() { Name = "Japanese" };

            context.Set<Major>().Add(m1);
            context.Set<Major>().Add(m2);
            context.Set<Major>().Add(m3);
            context.Set<Major>().Add(m4);
            context.Set<Major>().Add(m5);
            context.Set<Major>().Add(m6);
            context.Set<Major>().Add(m7);
            context.Set<Major>().Add(m8);
            context.Set<Major>().Add(m9);
            context.Set<Major>().Add(m10);

            context.SaveChanges();


            Job j1 = new Job() {Currency=c1 , Name = "Active Directory and File Server Administrator", Industry = i6, Location = l18, SalaryFrom = "50000", SalaryTo = "10000000", Status = 1, DatePost = DateTime.Now.AddDays(-8), PersonalInfor = pi2, Description = "This role works closely with Service Desk product managers (both in Ho Chi Minh City and in Sydney), designers in Sydney and technical leads to make the best possible experience for users. This entails wireframing, sketching, mockups, prototypes and more." };
            Job j2 = new Job() { Currency = c2, Name = "Cloud Infrastructure Tester", Industry = i7, Location = l20, SalaryFrom = "50000", SalaryTo = "7000000", Status = 1, DatePost = DateTime.Now.AddDays(-15), PersonalInfor = pi2, Description = "You will be responsible for projects and day-to-day sales for the assigned territory and assist in pre and post sales technical support. You will also assist in developing and implementing sales and marketing strategy to achieve targets set." };
            Job j3 = new Job() { Currency = c3, Name = "Chief Accountant", Industry = i8, Location = l23, SalaryFrom = "60000", SalaryTo = "30000000", Status = 1, DatePost = DateTime.Now.AddDays(-14), PersonalInfor = pi2, Description = "Under the direct supervision of the Chief of ICT and Campus Computing Centre, the Software Engineer will work in a small team environment to support, maintain and enhance the intranet and extranet ecosystem as well as design, prototype, implement, test and deploy new enterprise applications.  We are looking for a passionate and talented software engineer to work in our office in Tokyo or Kuala Lumpur.  The ideal candidate will be a highly skilled professional who is passionate about programming and loves to build quality user-friendly software systems of high value by leveraging libraries and web services.  In addition, the ideal candidate is versatile and keen to take on challenges with the desire to explore and extend his/her skills with emerging technologies; is able to produce results under constraints of time, budget and available expertise; possess strong interpersonal and teamwork skills to succeed in a multicultural, international environment." };
            Job j4 = new Job() { Currency = c4, Name = "IT Specialist", Industry = i9, Location = l24, SalaryFrom = "50000", SalaryTo = "8500000", Status = 1, DatePost = DateTime.Now.AddDays(-13), PersonalInfor = pi2, Description = "K2 Partnering Solutions is looking for SAP Project Manager - Permanent - Singapore  with one of the leading international organization." };
            Job j5 = new Job() { Currency = c5, Name = "Active Directory and File Server Administrator and something more", Industry = i10, Location = l19, SalaryFrom = "50000", SalaryTo = "10000000", Status = 1, DatePost = DateTime.Now.AddDays(-9), PersonalInfor = pi2, Description = "K2 Partnering Solutions - License No.11C5784  - Is searching and screening candidates interested in working as Enterprise Service Management - Manager, for a prime organization here in Singapore. The ideal candidate will have a minimum of 6 years in Managed Services, or Enterprise Service Management for large organisations, in global contexts with a total of overall experience of at least 10 years. You will be experienced in defining ITIL Managed Services and Service Level agreement." };
            Job j6 = new Job() { Currency = c6, Name = "Regulatory Affair Associates", Industry = i11, Location = l22, SalaryFrom = "50000", SalaryTo = "7000000", Status = 1, DatePost = DateTime.Now.AddDays(-20), PersonalInfor = pi2, Description = "K2 Partnering Solutions - License No.11C5784  - Is searching and screening candidates interested in working as Enterprise Service Management - Manager, for a prime organization here in Singapore. The ideal candidate will have a minimum of 6 years in Managed Services, or Enterprise Service Management for large organisations, in global contexts with a total of overall experience of at least 10 years. You will be experienced in defining ITIL Managed Services and Service Level agreement." };
            Job j7 = new Job() { Currency = c1, Name = "Chief Accountant", Location = l21, Industry = i12, SalaryFrom = "50000", SalaryTo = "30000000", Status = 1, DatePost = DateTime.Now.AddDays(-30), PersonalInfor = pi2, Description = "Leading a team of security analysts in obtaining, analyzing and dealing with security data to enable the protection of Atlassian and its customers. In this role, you will identify and investigate suspicious activity and help to solve complex security problems." };
            Job j8 = new Job() { Currency = c2, Name = "IT Specialist", Location = l23, Industry = i12, SalaryFrom = "50000", SalaryTo = "8500000", Status = 1, DatePost = DateTime.Now.AddDays(-31), PersonalInfor = pi2, Description = "Based in Yangon, Myanmar and reporting to the Country Manager New Markets and the Finance Manager Thailand, you will form a crucial part of a flexible high performing team.  In this position, you will be responsible for managing and overseeing the financial results of the company in addition to implementing and maintaining legal compliance." };
            Job j9 = new Job() { Currency = c3, Name = "Indirect Procurement Executive", Industry = i11, Location = l24, SalaryFrom = "50000", SalaryTo = "10000000", Status = 1, DatePost = DateTime.Now.AddDays(-37), PersonalInfor = pi3, Description = "This is description which support some basic character" };
            Job j10 = new Job() { Currency = c4, Name = "Sales Planning Supervisor", Industry = i7, Location = l21, SalaryFrom = "50000", SalaryTo = "7000000", Status = 1, DatePost = DateTime.Now.AddDays(-2), PersonalInfor = pi3, Description = "This is description which support some basic character" };
            Job j11 = new Job() { Currency = c5, Name = "Technical Sales Manager", Industry = i8, Location = l8, SalaryFrom = "50000", SalaryTo = "30000000", Status = 1, DatePost = DateTime.Now.AddDays(-10), PersonalInfor = pi3, Description = "This is description which support some basic character" };
            Job j12 = new Job() { Currency = c6, Name = "IT Specialist", Location = l24, Industry = i9, SalaryFrom = "50000", SalaryTo = "8500000", Status = 1, DatePost = DateTime.Now.AddDays(-18), PersonalInfor = pi3, Description = "This is description which support some basic character" };
            Job j13 = new Job() { Currency = c1, Name = "Human Resources Manager", Industry = i10, Location = l19, SalaryFrom = "50000", SalaryTo = "10000000", Status = 1, DatePost = DateTime.Now.AddDays(-20), PersonalInfor = pi3, Description = "This is description which support some basic character" };
            Job j14 = new Job() { Currency = c2, Name = "Spare Parts Manager", Industry = i12, Location = l20, SalaryFrom = "50000", SalaryTo = "7000000", Status = 1, DatePost = DateTime.Now, PersonalInfor = pi3, Description = "This is description which support some basic character" };
            Job j15 = new Job() { Currency = c3, Name = "Senior IS Analyst", Industry = i11, Location = l18, SalaryFrom = "50000", SalaryTo = "30000000", Status = 1, DatePost = DateTime.Now, PersonalInfor = pi3, Description = "This is description which support some basic character" };
            Job j16 = new Job() { Name = "Spare Parts Manager", Industry = i9, Location = l25, SalaryFrom = "Competitive", SalaryTo = "", Status = 1, DatePost = DateTime.Now, PersonalInfor = pi3, Description = "This is description which support some basic character" };

            ApplyJob aj1 = new ApplyJob() { Job = j1, PersonalInfor = pi4, ApplyDate = DateTime.Now.AddDays(-2) };
            ApplyJob aj2 = new ApplyJob() { Job = j1, PersonalInfor = pi5, ApplyDate = DateTime.Now.AddDays(-5) };
            ApplyJob aj3 = new ApplyJob() { Job = j4, PersonalInfor = pi6, ApplyDate = DateTime.Now.AddDays(-10) };
            ApplyJob aj4 = new ApplyJob() { Job = j4, PersonalInfor = pi7, ApplyDate = DateTime.Now.AddDays(-8) };
            ApplyJob aj5 = new ApplyJob() { Job = j4, PersonalInfor = pi8, ApplyDate = DateTime.Now.AddDays(-15) };
            ApplyJob aj6 = new ApplyJob() { Job = j4, PersonalInfor = pi9, ApplyDate = DateTime.Now.AddDays(-13) };

            context.Set<ApplyJob>().Add(aj1);
            context.Set<ApplyJob>().Add(aj2);
            context.Set<ApplyJob>().Add(aj3);
            context.Set<ApplyJob>().Add(aj4);
            context.Set<ApplyJob>().Add(aj5);
            context.Set<ApplyJob>().Add(aj6);

            Role r1 = new Role() { Name = "Employer"};
            Role r2 = new Role() { Name = "Worker" };
            Role r3 = new Role() { Name = "Admin" };

            Menu mn1 = new Menu() { Name = "Home", Controller="Home", Method = "Index", Description="This is basic menu for all user (even guest). In this, user can view job details, filter, search job with some criteria which are listed in search form" };
            Menu mn2 = new Menu() { Name = "Manage", Controller = "Employer", Method = "Employer", Description="Allow user post jobs, edit employer description and more. This menu is suitable for Employer role but in some case Worker role also access with some limitation" };
            Menu mn3 = new Menu() { Name = "Data Administration", Controller = "Employer", Method = "DataAdmin", Description = "Manage content include: location management, account management, etc. Each function in this menu should modify in limitation since changes can create mess in database" };

            RoleMenu rm1 = new RoleMenu() { Role = r1, Menu = mn1 };
            RoleMenu rm2 = new RoleMenu() { Role = r1, Menu = mn2 };
            RoleMenu rm4 = new RoleMenu() { Role = r2, Menu = mn1 };
            RoleMenu rm5 = new RoleMenu() { Role = r3, Menu = mn1 };
            RoleMenu rm6 = new RoleMenu() { Role = r3, Menu = mn2 };
            RoleMenu rm7 = new RoleMenu() { Role = r3, Menu = mn3 };
            RoleMenu rm8 = new RoleMenu() { Role = r2, Menu = mn2 };

            context.Set<RoleMenu>().Add(rm1);
            context.Set<RoleMenu>().Add(rm2);
            context.Set<RoleMenu>().Add(rm4);
            context.Set<RoleMenu>().Add(rm5);
            context.Set<RoleMenu>().Add(rm6);
            context.Set<RoleMenu>().Add(rm7);
            context.Set<RoleMenu>().Add(rm8);

            Account a1 = new Account() { Email = "haovt2408@yahoo.com", Password = "123", Role= r3, PersonalInfor = pi1, Status = 1};
            Account a2 = new Account() { Email = "hao@yahoo.com", Password = "123", Role = r1, PersonalInfor = pi2, Status = 1 };
            Account a3 = new Account() { Email = "anh@yahoo.com", Password = "123", Role = r2, PersonalInfor = pi3, Status = 1 };

            Account a4 = new Account() { Email = "a@yahoo.com", Password = "123", Role = r1, PersonalInfor = pi4, Status = 0 };
            Account a5 = new Account() { Email = "b@yahoo.com", Password = "123", Role = r2, PersonalInfor = pi5, Status = 0 };
            Account a6 = new Account() { Email = "c@yahoo.com", Password = "123", Role = r3, PersonalInfor = pi6, Status = 1 };
            Account a7 = new Account() { Email = "d@yahoo.com", Password = "123", Role = r2, PersonalInfor = pi7, Status = 1 };
            Account a8 = new Account() { Email = "e@yahoo.com", Password = "123", Role = r1, PersonalInfor = pi8, Status = 2 };
            Account a9 = new Account() { Email = "f@yahoo.com", Password = "123", Role = r2, PersonalInfor = pi9, Status = 2 };
            Account a10 = new Account() { Email = "g@yahoo.com", Password = "123", Role = r2, PersonalInfor = pi10, Status = 2 };
            Account a11 = new Account() { Email = "h@yahoo.com", Password = "123", Role = r1, PersonalInfor = pi11, Status = 1 };
            Account a12 = new Account() { Email = "i@yahoo.com", Password = "123", Role = r2, PersonalInfor = pi12, Status = 1 };
            Account a13 = new Account() { Email = "j@yahoo.com", Password = "123", Role = r2, PersonalInfor = pi13, Status = 0 };
            Account a14 = new Account() { Email = "k@yahoo.com", Password = "123", Role = r2, PersonalInfor = pi14, Status = 1 };

            context.Set<Account>().Add(a1);
            context.Set<Account>().Add(a2);
            context.Set<Account>().Add(a3);
            context.Set<Account>().Add(a4);
            context.Set<Account>().Add(a5);
            context.Set<Account>().Add(a6);
            context.Set<Account>().Add(a7);
            context.Set<Account>().Add(a8);
            context.Set<Account>().Add(a9);
            context.Set<Account>().Add(a10);
            context.Set<Account>().Add(a11);
            context.Set<Account>().Add(a12);
            context.Set<Account>().Add(a13);
            context.Set<Account>().Add(a14);

            context.Set<Job>().Add(j1);
            context.Set<Job>().Add(j2);
            context.Set<Job>().Add(j3);
            context.Set<Job>().Add(j4);
            context.Set<Job>().Add(j5);
            context.Set<Job>().Add(j6);
            context.Set<Job>().Add(j7);
            context.Set<Job>().Add(j8);
            context.Set<Job>().Add(j9);
            context.Set<Job>().Add(j10);
            context.Set<Job>().Add(j11);
            context.Set<Job>().Add(j12);
            context.Set<Job>().Add(j13);
            context.Set<Job>().Add(j14);
            context.Set<Job>().Add(j15);
            context.Set<Job>().Add(j16);

            context.SaveChanges();

        }
    }
}